package com.pagoda.nerp.web.entities;

import com.pagoda.nerp.web.util.DatetimeAdapter;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;


@Entity
@Table(name = "hrzgzd")
@Data
@NoArgsConstructor
@AllArgsConstructor
@XmlRootElement(name = "hrzgzd")
public class HRZGZD {
    @Id
    private String code;
    private String mobile;
    private String name;
    private Character status;
    private String idcard;
    private Date birthday;
    private String unitid;
    private String unit;
    private String unitname;
    private String deptid;
    private String dept;
    private String deptname;
    private String postid;
    private String postcode;
    private String postname;
    private String unitdeptname;
    private Date entrytime;
    private Date modifytime;
    private String canonicalcode;
    private String hrzgzdlist;

    @XmlElement(name = "entrytime")
    @XmlJavaTypeAdapter(DatetimeAdapter.class)
    public Date getEntrytime() {
        return entrytime;
    }

    @XmlElement(name = "modifytime")
    @XmlJavaTypeAdapter(DatetimeAdapter.class)
    public Date getModifytime() {
        return modifytime;
    }
}
